<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/layouts/template.xhtml">
	<ui:define name="body">
		<h:form id="form" acceptcharset="ISO-8859-1">
			<p:panel header="#{msgs['massai.user.alterPassword']}">
				<h:panelGrid columns="2" cellpadding="5" style="margin: 0 auto;">
						<p:outputLabel value="#{msgs['massai.user.atuallyPassword']}" for="atuallyPassword" style="float: right;" />
						<p:password value="#{userBean.atuallyPass}" id="atuallyPassword" required="true" 
							label="#{msgs['massai.user.atuallyPassword']}" requiredMessage="Senha Atual #{msgs['common.required.field']}" />

						<p:outputLabel value="#{msgs['massai.user.newPassword']}" for="newPassword" style="float: right;" />
						<p:password value="#{userBean.newPass}" id="newPassword" required="true" feedback="true" match="newPasswordConfirm"
							label="#{msgs['massai.user.newPassword']}" requiredMessage="Nova Senha #{msgs['common.required.field']}"
							weakLabel="Senha Fraca" goodLabel="Senha Boa" strongLabel="Senha Forte" promptLabel="Insira a Senha" validatorMessage="A confirmação deve ser igual a Nova Senha." />

						<p:outputLabel value="#{msgs['massai.user.newPasswordConfirm']}" for="newPasswordConfirm" />
						<p:password value="#{userBean.newPass}" id="newPasswordConfirm" required="true" feedback="true"
							label="#{msgs['massai.user.newPasswordConfirm']}" requiredMessage="Senha de Confirmação #{msgs['common.required.field']}" 
							weakLabel="Senha Fraca" goodLabel="Senha Boa" strongLabel="Senha Forte" promptLabel="Insira a Senha" validatorMessage="A confirmação deve ser igual a Nova Senha." />

					<p:spacer width="0" />
					<h:commandButton actionListener="#{userBean.passwordChange()}" value="#{msgs['common.save']}" style="float: right;" />
				</h:panelGrid>
			</p:panel>
		</h:form>
	</ui:define>
</ui:composition>
</html>